ILLUMINATI - FOR 8K (OR MORE) PET 2001
- also 3008 and (probably) other models
(Part V of The Illuminati Project)
by Jim Waterman, 26 April - 22 May 2022
=======================================


Context
-------

In the beginning, "the most ludicrous year" of 2020, there was the original Illuminati game, sent to John Connolly's 2020 comp.sys.sinclair Crap Games Competition, as the only ZX81 entry for that year. It was, as I like to do, "a ludicrously over-polished game" (by ZX81 CSSCGC standards, anyway). For the most part, it was a vehicle to show off that my first steps in rudimentary Z80 machine code could also be replicated on the ZX81 where I didn't have the luxury of a built-in assembler (at least, I hadn't discovered JSZeddy at the time!).

During my tenure of the 2021 CSSCGC, I couldn't enter my own competition, so the Spectrum conversion was sent to Dave Hughes for his WOOT! Tape Magazine at the end of the year. The idea was to enhance the game with COLOUR! and SOUND! - but also to fit it into the 16K model. Given that the program for the 16K ZX81 was around 9K, and the 16K Spectrum has less than that available because the screen takes up 6,912 bytes instead of 792, it needed a lot more to be done in machine code (including sounds that were pilfered from games and magazine listings of 1983...) *and* a load of VALs and NOT/SGN/INT PIs - just like 1K ZX81 programmers had to do - to make it fit.

Come 2022, I could enter the CSSCGC again, this time with Andy Jenkinson as host. He'd get the all-singing-all-dancing QL version, with much-enhanced graphics at the expense of miserable sound. Though it was entirely possible to write the Illuminati's Top-Secret Calculation Formula in a custom SuperBASIC function (which I did, initially), in a further callback to the original game, this function was rewritten in 68008 machine code. It was my first attempt at that, and it worked without too much fuss.

And then, I thought I'd convert it for as many other 1980s computers as possible. The Amstrad CPC, MSX or any other Z80-based machine would have been easy enough... but I thought I'd take the harder route, that of the Commodore machines, with their 6502 processors and *another* new set of instructions to learn. The VIC-20 got the nod for my first foray outside the Sinclair world, and the PET 2001 (with BASIC 1.0) came next, given that I'd tried to program it before - see "Magiapotagia 1977" for details...

The PET version wasn't just a case of taking the VIC-20 version and adapting it for a monochrome, 40×25 screen - the zero pages of the PET and VIC-20 are different, *and* the zero pages of the PET 2001 (with BASIC 1.0) and PET 3008 (with BASIC 2.0) are also different from each other, so I had to revert to an old version of the Illuminati's Top-Secret Calculation Formula that used absolute address instructions instead of zero page instructions. Still, this means it should work on any 40-column PET... right? (Tell me if it doesn't!)


Loading instructions (for those who need them)
----------------------------------------------

Disc: LOAD"IL",8
Tape: LOAD"IL" or even just LOAD""

As with "Magiapotagia 1977", I have found problems with tape images on the PET 2001. I've provided a disc version as well as a tape. Both the disc and tape were saved on the PET 2001, but loading the tape on the PET 2001 will only reveal a corrupted listing. It works fine on the PET 3008. I am told that the PET 2001 (the very first model from 1977 with BASIC 1.0 and the chiclet keyboard) requires an extra zero byte at the beginning of the file which makes it distinct from the other PET models - but still, why saving on a PET results in a tape that will only run on other PET models is beyond my understanding of these machines... it may be a problem with VICE's emulation.

If all else fails, attach a virtual CBM 4040 disc drive and get cracking with that. I consider it less authentic to do so, though, as this version was supposed to be compatible with all the PETs right the way back to 1977.

Maybe there'll be a fix one day...


The ludicrous backstory (mostly copied from the ZX81 original)
--------------------------------------------------------------

Ludicrous backstories were a feature of my 2020 CSSCGC games - but given that this one involves the Illuminati, there's no pressing need. You can believe in this cabal of very powerful elites manipulating the leaders of the world like puppets on strings, or not - the choice is yours. It is said that behind every conspiracy theory there is a seed of truth just waiting to be discovered (or an outright Spoiler Alert), but it's very hard not to be distracted from finding that truth when, for instance, David Icke mentions shape-shifting lizards, or Alex Jones starts shouting so furiously that his head looks like it'll explode.

But anyway, the story is - the Illuminati are about to take over the world, and you have to stop them. (Paul Joseph Watson interjects here, to say "Well, imagine my shock!" the way he does. And he would be right do so at this point, because who didn't see that coming?) The Illuminati's Top Secret Pyramid has a combination lock which requires the input of three bytes of code in hexadecimal format - with a total of 16,777,215 possible combinations. Unfortunately, for them at least, they put a complete brainlet in charge of writing the code to secure the lock - who has only just read about it in a book that's nearly 40 years out of date. The Illuminati, of course, are not technically-minded so they have absolutely no idea about this, and they're far too busy plotting what they're going to do once they get hold of China's even-more-top-secret virus research labs (as if what we're STILL all being put through AFTER TWO YEARS isn't enough).

Input the three hex codes into the pyramid, and they will propagate upwards according to a secret code known only to the Programmer... and anyone else who knows how to disassemble 133 bytes of 6502 machine code (bearing in mind the JMP instruction is only there because I had to split the main routine into two REM statements!). Once the codes reach the top of the pyramid, if the final hex byte matches the one displayed above the Evil Eye, the lock will open, and the Illuminati will be destroyed - somehow, say, a bomb goes off in their headquarters, or the virus they're going to unleash turns out to be specifically targeted at themselves. (Or you make up your own story, it's not as if anyone's going to believe it anyway.) Either way, humanity is saved, and the people across the world danced and skipped in the street with delight, and feasted on steamed hams, and fruit bats, and breakfast cereals, and Pan-Galactic Gargle Blasters, and... so on, and so on, you get the idea by now. Look, I didn't say it had to make sense, did I?

The Illuminati's security is so weak that only 64 out of the possible 256 bytes will ever result from any of the 16,777,215 hex combinations. You only have 16 attempts to match the code, and it changes every time you try... but this does at least mean you have a 1 in 4 chance of cracking the code overall.

If this all sounds absolutely window-licking mental, it's because it is. November 2020, when the original ZX81 version was written, was near the end of a second entire month confined to my house (i.e. never venturing more than about five metres beyond my front door, just to put the bins out - April 2020 was the first); a third followed (January 2021), and I get the distinct impression that I am not going to live to see the end of this hideous mess. This has had absolutely no detrimental effects at all. Was that sarcasm? You decide.


Extra bonus endorsement
-----------------------

Those who want a game all about the Illuminati and weird conspiracy theories THAT'S ACTUALLY GOOD would do well to equip yourselves with a copy of Doom II, a suitable modern source port (GZDoom is the one I use), and the excellent megawad "Ancient Aliens". Points to mention are:
(1) It is very hard - you *will* get mashed to a pulp, very regularly, if you play on Ultra-Violence;
(2) It is very colourful - it has a completely different palette to regular Doom wads, with bright neon lights everywhere and a lot of blue and magenta welded together;
(3) It sounds *brilliant*, as every backing track was composed by Stuart Rynn, the Doom world's answer to Henri Sorvali;
(4) I'm not saying it was made by aliens... but it was aliens.

A second wad, Final Doomer, will add the choice of weapons appropriate to various custom megawads, and Ancient Aliens is included. Add this on top for twice the experience!

Ancient Aliens deservedly won a Cacoward in 2016. Get it NOW!
https://doomwiki.org/wiki/Ancient_Aliens
https://www.doomworld.com/idgames/levels/doom2/Ports/megawads/aaliens
